package ai.assist.common.businesss.mongo.entity;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.IdTypeEnum;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统用户
 * @TableName sys_user
 */
@CollectionName(value ="sys_user")
@Data
public class SysUser implements Serializable {
    /**
     * 用户id
     */
    @ID(type = IdTypeEnum.OBJECT_ID)
    @CollectionField("_id")
    private String id;

    /**
     * 账户名称
     */
    @CollectionField(value = "username")
    private String username;

    /**
     * 加密盐值
     */
    @CollectionField(value = "salt")
    private String salt;

    @CollectionField(value = "email")
    private String email;

    /**
     * 用户密码密文
     */
    @CollectionField(value = "password")
    private String password;

    /**
     * 手机号码
     */
    @CollectionField(value = "phone")
    private String phone;

    /**
     * 办公电话
     */
    @CollectionField(value = "telephone")
    private String telephone;

    /**
     * 部门id
     */
    @CollectionField(value = "dept_id")
    private Long deptId;

    /**
     * 真实名称
     */
    @CollectionField(value = "real_name")
    private String realName;

    /**
     * 昵称
     */
    @CollectionField(value = "nick_name")
    private String nickName;


    /**
     * 账户状态(1.正常 2.锁定 )
     */
    @CollectionField(value = "status")
    private Integer status;

    /**
     * 性别(1.男 2.女)
     */
    @CollectionField(value = "sex")
    private Integer sex;

    /**
     * 是否删除(1未删除；0已删除)
     */
    @CollectionField(value = "deleted")
    private Integer deleted;

    /**
     * 创建人
     */
    @CollectionField(value = "create_id")
    private String createId;

    /**
     * 更新人
     */
    @CollectionField(value = "update_id")
    private String updateId;

    /**
     *
     */
    @CollectionField(value = "update_time")
    private Date updateTime;

    /**
     * 创建时间
     */
    @CollectionField(value = "create_time")
    private Date createTime;

    /**
     *
     */
    @CollectionField(value = "login_times")
    private Integer loginTimes;

    /**
     *
     */
    @CollectionField(value = "last_login_time")
    private Date lastLoginTime;

    /**
     *
     */
    @CollectionField(value = "last_login_ip")
    private String lastLoginIp;

    @CollectionField(exist = false)
    private static final long serialVersionUID = 1L;
}
